﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="InsertForm.aspx.cs" Inherits="sandbox" %>
<%@ register tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Insert an Application</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div id="RadGrid_Web20Div">
    <strong>
Welcome to CareerPath!</strong>
    <br />
    <br />
    This is an on-line application program that keeps track of job applications and interviews. To begin, first upload your application. Then,
    go to the Edit applications tab. To schedule an interview, click on the Interview tab. 
    <br />
    <br />
    
    <table style="width: 100%" border="0">
        <tr>
            <td class="style2">
                Date:</td>
            <td class="style1">
                <telerik:RadDatePicker ID="DatePicker" DbSelectedDate='<%#Eval("Dates")%>' Skin="Web20" Width="150px" runat="server">
                </telerik:RadDatePicker>            </td>

            <td>
                <asp:RequiredFieldValidator ID="DateValidator" runat="server" 
                    ControlToValidate="DatePicker" Display="Dynamic" ErrorMessage="Date required." 
                    ToolTip="Date required.">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Position Name:</td>
            <td class="style1">
                <asp:TextBox ID="PositionNameTextBox" Width="200px" runat="server"></asp:TextBox>
                    </td>
            <td>
                <asp:RequiredFieldValidator ID="PositionValidator" runat="server" 
                    ControlToValidate="PositionNameTextBox" Display="Dynamic" ErrorMessage="Position required." 
                    ToolTip="Date required.">*</asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td class="style2">
                Company Name:</td>
            <td class="style1">
                <asp:TextBox ID="CompanyNameTextBox" Width="200px" runat="server"></asp:TextBox>
                    </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                Company E-Mail:</td>
            <td class="style1">
                <asp:TextBox ID="CompanyEMailTextBox" Width="200px" runat="server"></asp:TextBox>
                    </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                Company City</td>
            <td class="style1">
                <asp:TextBox ID="CompanyCityTextBox" Width="200px" runat="server"></asp:TextBox>
                    </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                Job Source</td>
            <td class="style1">
                <telerik:RadComboBox ID="RadComboBox1" Runat="server" 
                    DataSourceID="LinqDataSource1" DataTextField="Source" DataValueField="SourceID" 
                    Skin="Web20" Width="200px">
                </telerik:RadComboBox>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                    ContextTypeName="CareerPathDataContext" OrderBy="Source" 
                    Select="new (SourceID, Source)" TableName="cp_SourceTables">
                </asp:LinqDataSource>
                    </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                Upload Job Ad:</td>
            <td class="style1">
     <telerik:RadUpload
                                ID="AdFileUpload" runat="server"
                                Skin="Web20"
                                MaxFileInputsCount="1"
                                
                                OverwriteExistingFiles="false" AllowedFileExtensions=".doc,.docx,.rtf,.txt,.pdf" />
            </td>
            <td>
              
            </td>
</tr>
        <tr>
            <td class="style2">
                Upload Application:</td>
            <td class="style1">
    <telerik:RadUpload
                                ID="upFile" runat="server"
                                Skin="Web20"
                                MaxFileInputsCount="1"
                                OverwriteExistingFiles="false" AllowedFileExtensions=".doc,.docx, rtf, .txt" />
            </td>
            <td>
             
            </td>
</tr>
</table>
<br />
<asp:Button
        id="btnAdd"
        Text="Add Application"
        OnClick="btnAdd_Click" 
        Runat="server" />
        <br />
        <br />
        <asp:Label ID="ErrorLabel" runat="server" ForeColor="Red"></asp:Label>
        <br />
        <asp:Label ID="upFileError" runat="server" ForeColor="Red"></asp:Label>
<br />
        <asp:Label ID="adFileError" runat="server" ForeColor="Red"></asp:Label>

        <telerik:radformdecorator ID="RadFormDecorator1" Runat="server" 
    Skin="Web20" />
<p>
    &nbsp;</p>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" 
    ShowMessageBox="True" ShowSummary="False" />
    </div>
    </form>
</body>
</html>
